Mapping applications executed by electronic devices such as desktop computers and smartphones display maps to users in order to provide useful geographic information. In some cases, such geographical information may include an indication of a nearest point of a map object to a position. For example, a user of a smartphone who wants to catch a glimpse of a parade may use a mapping application to locate a nearest point along the parade route. The mapping application may obtain a position of the smartphone via a positioning component, download information concerning the parade route via a networking component, calculate which point along the parade route is nearest to the position, and display an indication of the calculated point to the user.
Conventional methods for identifying a point of a curve nearest to a position generally involve calculating a distance from the position to each point of the curve, then identifying the point of the curve having the smallest distance to the position. While such methods are suitable in some instances, particularly when the curve does not comprise many points, in some instances they can be computationally intensive and demand a significant amount of computing resources.
There is therefore a need for improvements to methods for displaying a position on a map comprising identifying a point of a curve nearest to the position.